{% extends "base_site.html" %}
{% load i18n %}
{% load tabind %}

{% block content_title %}
<h2>{{ content_title }}</h2>
{% endblock %}
{% block content %}
  <div id="content-main">
    {% if data_list %}
      <form action="{{action}}" method="post">{% csrf_token %}
        <div>
          <div class="in-line-link"><h4>{{title}}</h4></div>
          <div class="in-line"><input type="submit" name="add_obj_on_desktop" value="Add to DeskTop" /></div>
        </div>
        {% for dt in data_list %}
          <div>
            {% ifequal action "/adddesktop/DeskTop/" %}
            <div class="in-line-link"><a href="/base/{{ dt.0.id }}">{{ dt.0 }}</a></div>
            {% endifequal %}
            {% ifequal action "/adddesktop/GroupDeskTop/" %}
            <div class="in-line-link"><a href="/admin/auth/group/{{ dt.0.id }}">{{ dt.0 }}</a></div>
            {% endifequal %}
            {% ifequal action "/adddesktop/ClassDeskTop/" %}
              <div class="in-line-link">{{ dt.0 }}</div>
            {% endifequal %}
            {% ifequal dt.1 "checkbox" %}
              <div class="in-line"><input type="checkbox" id="obj_{{ dt.0.id }}" name="obj_to_desk_{{ dt.0.id }}" value="{{ dt.0.id }}" /></div>
            {% else %}
              <div class="in-line">{{ dt.1 }}</div>
            {% endifequal %}
          </div>
        {% endfor %}
        <div>
          <div class="in-line-link">&nbsp;</div>
          <div class="in-line"><input type="submit" name="add_obj_on_desktop" value="Add to DeskTop" /></div>
        </div>
      </form>
    {% else %}
        <p>{% trans 'List is empty '%}</p>
    {% endif %}
  </div>
{% endblock %}

